subroutine getlstuhf(icore,nfirst, nread,&
                          ispin, ilist,filename) 
use mod_symm
use mod_iop
use mod_size
use mod_orbit
use mod_ioff 
implicit none 
integer, intent(in) :: ilist, ispin, nfirst, nread 
real*8, intent(in) :: icore(*)
character(len=8),intent(in) :: filename
integer nva2, noa2, nvb2, nob2, nvab, noab, nvoa, nvob, nvaob, nvboa
!
nva2 = nva*(nva-1)/2
noa2 = noa*(noa-1)/2
nvb2 = nvb*(nvb-1)/2
nob2 = nob*(nob-1)/2
nvab = nva*nvb
noab = noa*nob
nvoa = nva*noa
nvob = nvb*nob
nvaob = nva*nob
nvboa = nvb*noa
!----------cc_int = 1 from cfour 
if(prec==8.and.cc_int/=3) then 
!   write(6,*)'getlstso', filename
   call getlstso(icore, nfirst, nread, ispin, ilist, filename)
elseif(prec==4.and.cc_int/=3) then 
   call getlstso_s(icore, nfirst, nread, ispin, ilist, filename)
!----------cc_int = 2 from amesp 
elseif(prec==8.and.cc_int==3) then 
   if(filename=='ABCIAA__') THEN
      call getlst_nsym(icore, nfirst, nread, 'VVVO__AA', & 
                nva, nva, 0, nva, noa, 1)
!      call getamesp_int(icore, nfirst, nread, nva2,  'VVVO__AA') 
   elseif(filename=='ABCIAB__') THEN 
      call getlst_nsym(icore, nfirst, nread, 'VVVO__AB', & 
                nva, nvb, 1, nva, nob, 1)
!      call getamesp_int(icore, nfirst, nread, nvab, 'VVVO__AB') 
   elseif(filename=='ABCIBA__') THEN 
      call getlst_nsym(icore, nfirst, nread, 'VVVO__BA', & 
                nvb, nva, 1, nvb, noa, 1)
!      call getamesp_int(icore, nfirst, nread, nvab, 'VVVO__BA') 
   elseif(filename=='ABCIBB__') THEN 
      call getlst_nsym(icore, nfirst, nread, 'VVVO__BB', & 
                nvb, nvb, 0, nvb, nob, 1)
!      call getamesp_int(icore, nfirst, nread, nvb2,  'VVVO__BB') 
!
   elseif(filename=='ABCDAA__') THEN 
!      call getamesp_int(icore, nfirst, nread, nva2,  'VVVV__AA') 
      call getlst_nsym(icore, nfirst, nread, 'VVVV__AA', & 
                nva, nva, 0, nva, nva, 0)
   elseif(filename=='ABCDAB__') THEN
!      call getamesp_int(icore, nfirst, nread, nvab,  'VVVV__AB') 
      call getlst_nsym(icore, nfirst, nread, 'VVVV__AB', & 
                nva, nvb, 1, nva, nvb, 1)
   elseif(filename=='ABCDBB__') THEN 
!      call getamesp_int(icore, nfirst, nread, nvb2,  'VVVV__BB')
      call getlst_nsym(icore, nfirst, nread, 'VVVV__BB', & 
                nvb, nvb, 0, nvb, nvb, 0)
   else
      write(6,*)'error in getlstuhf' 
      stop
   endif 
elseif(prec==4.and.cc_int==3) then 
   call getlstso_s(icore, nfirst, nread, ispin, ilist, filename)
else   
   write(6,*)'error in getuhf' 
   stop
endif
!
return
end
